#11-1/2
import unittest
from city_functions import city_function
class CityTest(unittest.TestCase):
#注意，方法这里，设定的开头必须有test，不然无法运行
	def test_citytest(self):
		cityname = city_function("santiago", "chile")
		self.assertEqual(cityname, "Santiago, Chile")
	def test_nameandpopulation(self):
		result = city_function("santiago", "chile"," - population 500000")
		self.assertEqual(result, "Santiago, Chile - population 500000")
unittest.main()
#11-3
#好好琢磨一下，python的格式要求是比较严格的
import unittest
from employee import Employee
class TestEmployee(unittest.TestCase):
	def setUp(self):
		self.jennywork = Employee("jenny", "blair", 360000)
		self.increase = 5000
	def test_give_defalt_raise(self):
		self.assertEqual(5000,self.jennywork.increase)
	def test_give_custom_raise(self):
		self.jennywork.give_raise(7000) 
		self.assertEqual(12000, self.jennywork.increase)
unittest.main()
